package com.woniuxy.java106crm.mapper;

import com.woniuxy.java106crm.entity.User;
import com.woniuxy.java106crm.vo.SelectUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    User findByAccount(String username);

    /**根据id查用户*/
    User findById(Integer id);
    //查询客户经理
    List<SelectUserVo> selectManager();

    //查询全部系统用户
    List<User> queryUsers(User user);
    //添加用户
    Boolean addUser(User user);
    //删除用户
    Boolean deleteUser(Integer id);
    //删除用户关联关系表的权限
    Boolean deleteUserRole(Integer uid);
    //添加用户权限
    Boolean addUserRole(@Param("uid") Integer uid, @Param("rid") Integer rid);

    Boolean updateUser(User user);
}
